
package com.th.aliyun.oss.process;


import com.th.aliyun.oss.exception.OssException;

/**
 * Oss Upload and Download Progress
 *
 * @author 恒宇少年
 */
public interface AliYunOssObjectStorageProgress {
    /**
     * progress
     *
     * @param objectName          object name
     * @param percent             upload or download progress percent
     * @param totalBytes          total bytes
     * @param currentWrittenBytes already written bytes
     * @throws Exception Exception
     */
    void progress(String objectName, double percent, long totalBytes, long currentWrittenBytes) throws OssException;

    /**
     * upload or download success
     *
     * @param objectName object name
     * @throws Exception
     */
    void success(String objectName) throws OssException;

    /**
     * upload or download failed
     *
     * @param objectName object name
     * @throws Exception
     */
    void failed(String objectName) throws OssException;
}
